package com.example.pc.greenplants;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class XiaXuepianlianActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_xia_xuepianlian);

        //隐藏标题栏
        ActionBar actionBar = getSupportActionBar();
        if (actionBar!=null){
            actionBar.hide();
        }
        Button button1 = (Button) findViewById(R.id.button);
        Button button2 = (Button) findViewById(R.id.button2);
        Button button3 = (Button) findViewById(R.id.button3);
        button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://baike.baidu.com/item/夏雪片莲"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });

        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://haokan.baidu.com/v?pd=wisenatural&vid=17908392239578849870"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });


        button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://item.taobao.com/item.htm?id=591935894883&ali_trackid=2:mm_26632325_6860397_107179700491:1561704604_124_1556605839&clk1=ea2175e5ec51714bf01031f89c6bd9d6&spm=a231o.7712113%2Fg.1004.82&pvid=200_11.131.93.47_22904_1561704584235"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });

    }
}
